#!/usr/bin/env python
# -*- coding: utf-8 -*-


from enum import IntEnum
from mock.data import users

class MockDBClient:
    def close(self):
        pass

    def new_test(self, project: int, name: str, owner: str, type: IntEnum, description: str):
        pass

    def new_project(self, name: str, owner: str, type: IntEnum, description: str):
        pass

    def get_projects(self):
        pass
    
    def login(self, username, password):
        if username in users and users[username]['password'] == hashlib.md5(password.encode()).hexdigest():
            return users[username]
        else:
            return None